<style type="text/css" media="screen">
    hr {
        margin-top: 0px;
        margin-bottom: 15px;
        border: 0;
        border-top: 1px solid #ccc;
    }


</style>

 <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            {:build_heading(null, false)}

        </div>


        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="one">
                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                    <div class="form-group">
                        <div class="row">
                            <div class="col-xs-12 col-sm-12 text-center">
                                <h3>{$row.name|htmlentities}</h3>
                            </div>
                        </div>
                    </div>
                    {volist name="list" id="vo" key="k"}

                        <div class="form-group group-{$vo.item_id}" id="group_{$vo.item_id}" style="{$vo.group_style}">
                            <div class="row div-{$vo.item_id}">
                                <label class="control-label col-xs-12 col-sm-2" id="{$vo.item_id}_label">{if $vo.item_required == 1}<span style="color: red;">*</span>{/if}{$vo.item_label}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    {switch name="vo.item_type" }
                                        {case value="string"}
                                        <input class="form-control"  type="text"  value=" {:$row[$vo['item_id']]==-100?'待定':$row[$vo['item_id']]}" readonly >
                                        {/case}
                                        {case value="price"}
                                        <input class="form-control"  type="text"   value="{:$row[$vo['item_id']]?($row[$vo['item_id']]==-100?'待定':$row[$vo['item_id']]):''}" readonly >
                                        {/case}
                                        {case value="datetime|date"}
                                            <input class="form-control"  type="text"  value="{$row[$vo['item_id'].'_desc']}" readonly >
                                        {/case}
                                        {case value="select|selects"}
                                            {if isset($vo['item_rule']['is_relation']) && $vo['item_rule']['is_relation'] == "1" /}
                                            <input class="form-control" style="width: 42%" type="text"  value="<?php echo $row[str_replace('id','name',$vo['item_id'])]; ?>" readonly >
                                            <input class="form-control" style="width: 42%" type="text"  value="{$row[$vo['item_id'].'_relation']}" readonly >
                                            <span style="line-height: 31px;">{$row[$vo['item_id'].'_relation_unit']}</span>
                                            {else/}
                                            <input class="form-control"  type="text"  value="<?php echo $row[str_replace('id','name',$vo['item_id'])]; ?>" readonly >
                                            {/if}
                                        {/case}
                                        {case value="radio"}
                                          <input class="form-control"  type="text" value="{$row[$vo['item_id']]}" readonly  >

                                        {/case}
                                        {case value="text"}
                                            <textarea  class="form-control " rows="{$vo.item_rule.row}" cols="50" readonly>{$row[$vo['item_id']]}</textarea>
                                        {/case}
                                    {/switch}
                                </div>
                                <div class="col-xs-12 col-sm-4">

                                    {switch name="vo.item_type" }
                                        {case value="string"}
                                        {if $vo.item_pending == 1}
                                            <div class="input-group">
                                              <input class="form-control form_value" id="{$vo.item_id}" name="row[{$vo.item_id}]" type="text"  placeholder="请填写{$vo.item_label}"  value="{:$row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo['item_id']]}">
                                               <span class="input-group-addon">
                                              <input type="checkbox" class="pending" data-id="{$vo.item_id}" {:$row['tmp_'.$vo['item_id']]==-100?'checked':''} >待定
                                                </span>
                                            </div>
                                        {else/}
                                            <input type="text"
                                            class="form-control form_value"
                                            id="{$vo.item_id}"
                                            name="row[{$vo.item_id}]"
                                            placeholder="请填写要修改后的内容"
                                            value="{:$row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo['item_id']]}"
                                            >
                                        {/if}
                                        {/case}
                                        {case value="price"}
                                            {if  $vo.item_pending == 1}
                                             <div class="input-group">
                                              <input type="text"
                                                class="form-control form_value"
                                                id="{$vo.item_id}"
                                                name="row[{$vo.item_id}]"
                                                {:$row['tmp_'.$vo.item_id]== '-100'?"readonly":""}
                                                placeholder="请填写要修改后的内容"
                                                value="{:$row['tmp_'.$vo['item_id']]?($row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo['item_id']]):''}"  onkeyup="clearNoNum(this)"
                                                >
                                               <span class="input-group-addon">
                                              <input type="checkbox" class="pending" {:$row['tmp_'.$vo.item_id]==-100?'checked':''} data-id="{$vo.item_id}" aria-label="...">待定
                                                </span>
                                            </div>
                                            {else/}
                                                <input type="text"
                                                class="form-control form_value"
                                                id="{$vo.item_id}"
                                                name="row[{$vo.item_id}]"
                                                placeholder="请填写要修改后的内容"
                                                value="{:$row['tmp_'.$vo['item_id']]?($row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo['item_id']]):''}"  onkeyup="clearNoNum(this)"
                                                >
                                            {/if}
                                        {/case}
                                        {case value="datetime|date"}
                                            {if  $vo.item_pending == 1}
                                                <div class="input-group">
                                                  <input
                                                     class="form-control  {:$row['tmp_'.$vo['item_id']]==-100?'':'datetimepicker'} form_value"
                                                        type="text"
                                                        id="{$vo.item_id}"
                                                        name="row[{$vo.item_id}]"
                                                        {:$row['tmp_'.$vo.item_id]==-100?"readonly":""}
                                                        placeholder="请填写{$vo.item_label}"
                                                        data-date-format="YYYY-MM-DD"
                                                        value="{:$row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo.item_id.'_desc']}"
                                                    >
                                                   <span class="input-group-addon">
                                                    <input type="checkbox" class="pending pending-date"
                                                        {:$row['tmp_'.$vo.item_id]==-100?'checked':''}
                                                        data-id="{$vo.item_id}"
                                                        aria-label="...">待定
                                                    </span>
                                                    <span class="msg-box n-right"></span>
                                                </div>
                                            {else/}
                                            <input  type="text"
                                                class="form-control datetimepicker form_value"
                                                id="{$vo.item_id}"
                                                name="row[{$vo.item_id}]"
                                                data-date-format="YYYY-MM-DD"
                                                data-use-current="true"
                                                placeholder="请填写要修改后的内容"
                                                value="{:$row['tmp_'.$vo['item_id']]==-100?'待定':$row['tmp_'.$vo.item_id.'_desc']}"
                                            >
                                            {/if}
                                        {/case}
                                        {case value="selects"}
                                             <select
                                                class="form-control selectpicker form_value"
                                                id="{$vo.item_id}"
                                                name="row[{$vo.item_id}][]"
                                                multiple
                                                {if $vo.item_required==1}data-rule="required;"{/if}
                                                title="请选择"
                                                >
                                                    {volist name="vo.item_rule.datasource" id="vv"}
                                                        <option value="{$key}" {in name="key" value="$row['tmp_'.$vo.item_id]" }selected{/in}>{$vv}</option>
                                                    {/volist}

                                            </select>
                                        {/case}
                                        {case value="select"}
                                            {if isset($vo['item_rule']['is_relation']) && $vo['item_rule']['is_relation'] == "1" /}
                                            <div class="row">
                                                <div class="col-sm-5" style="padding-right: 0px">
                                                    <select class="form-control relation {:$row['tmp_'.$vo['item_id'].'_status']== STATUS_SUBMIT?'':'form_value'}"  name="row[{$vo.item_id}]" id="{$vo.item_id}" {if $vo.item_required==1}data-rule="required;"{/if}>
                                                        <option value="">请选择</option>
                                                        {volist name="vo.item_rule.datasource" id="vv" }
                                                            <option value="{$key}" {eq name="key" value="$row['tmp_'.$vo.item_id]"}selected{/eq}>{$vv}</option>
                                                        {/volist}
                                                    </select>
                                                </div>
                                                <div class="col-sm-5" style="padding-left:0px;padding-right: 0px;">
                                                    <div class="input-group">
                                                        <input class="form-control " id="{$vo.item_id}_relation"  value="{$row['tmp_'.$vo.item_id.'_relation']}">
                                                        <span class="input-group-addon">
                                                        <input type="checkbox" class="pending pending-date"
                                                            {:$row['tmp_'.$vo.item_id.'_relation']=='待定'?'checked':''}
                                                            data-id="{$vo.item_id}_relation"
                                                            aria-label="...">待定
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="col-sm-2" style="padding-left:2px;padding-right: 0px;line-height: 31px;"><span id="{$vo.item_id}_addon">{$row['tmp_'.$vo.item_id.'_relation_unit']}</span></div>
                                            </div>
                                            {else/}
                                                <select class="form-control form_value"  name="row[{$vo.item_id}]" id="{$vo.item_id}" {if $vo.item_required==1}data-rule="required;"{/if}>
                                                    <option value="">请选择</option>
                                                    {volist name="vo.item_rule.datasource" id="vv" }
                                                        <option value="{$key}" {eq name="key" value="$row['tmp_'.$vo.item_id]"}selected{/eq}>{$vv}</option>
                                                    {/volist}
                                                </select>

                                            {/if}
                                        {/case}
                                        {case value="radio"}
                                            <select class="form-control form_value" id="{$vo.item_id}"  name="row[{$vo.item_id}]" >
                                                <option value="">请选择</option>
                                                {if $vo.item_class=='command_type'}
                                                    <option value="省、市重点推进“双招双引”项目" {:$row['tmp_'.$vo.item_id]=="省、市重点推进“双招双引”项目"?"selected":""}>省、市重点推进“双招双引”项目</option>

                                                    <option value="市指挥部50个招商引资重点推进项目" {:$row['tmp_'.$vo.item_id]=="市指挥部50个招商引资重点推进项目"?"selected":""}>市指挥部50个招商引资重点推进项目</option>

                                                    <option value="区主要领导同志接洽重点在谈项目" {:$row['tmp_'.$vo.item_id]=="区主要领导同志接洽重点在谈项目"?"selected":""}>区主要领导同志接洽重点在谈项目</option>

                                                {else}
                                                    <option value="是" {:$row['tmp_'.$vo.item_id]=="是"?"selected":""}>是</option>
                                                    <option value="否" {:$row['tmp_'.$vo.item_id]=="否"?"selected":""}>否</option>
                                                    {if $vo.item_class=='access'}
                                                    <option value="无" {:$row['tmp_'.$vo.item_id]=="无"?"selected":""}>无须上准入例会项目</option>
                                                    {/if}
                                                {/if}
                                            </select>
                                        {/case}
                                        {case value="text"}
                                            <textarea
                                                class="form-control form_value"
                                                id="{$vo.item_id}"
                                                name="row[{$vo.item_id}]"
                                                rows="{$vo.item_rule.row}"
                                                placeholder="请填写要修改后的内容">{$row['tmp_'.$vo.item_id]|htmlentities}</textarea>
                                        {/case}

                                    {/switch}

                                </div>
                                <div class="col-xs-12 col-sm-2" >

                                </div>
                            </div>
                            <div class="row div-{$vo.item_id}" >
                                <label class="control-label col-xs-12 col-sm-2">{$vo.item_label_extra}</label>
                                <div class="col-xs-12 col-sm-4">
                                    <textarea id="{$vo.item_id}_submit_desc" class="form-control " rows="2" name="row[{$vo.item_id}_submit_desc]" data-required={:$row['tmp_'.$vo["item_id"].'_status']== STATUS_CREATE?0:1 } rows="2" cols="50"  placeholder="请填写修改原因">{$row['tmp_'.$vo['item_id'].'_submit_desc']}</textarea>
                                </div>
                                <div class="col-xs-12 col-sm-4" style="padding-top: 10px;" >
                                    <!-- <button type="button"  class="btn btn-info field_detail" data-item_id="{$vo.item_id}">{:__('修改记录')}</button> -->

                                    {if $isSuperAdmin == '1' }
                                        {if  $row['tmp_'.$vo['item_id'].'_status']== STATUS_REJECT}
                                        <button type="button"  class="btn  single_revoke_reject btn-danger " data-item_id="{$vo.item_id}">撤消驳回</button>
                                        {/if}
                                        <button type="button"  class="btn  single_clear btn-warning " data-item_id="{$vo.item_id}">删除当前值</button>
                                    {/if}
                                    {if $site.edit_switch}
                                    <button type="button"  class="btn  single_submit btn-success " data-item_id="{$vo.item_id}">提交</button>
                                    {/if}
                                    <span class="text-danger">{:$row['tmp_'.$vo['item_id'].'_status']== STATUS_SUBMIT?'已提交,等待管理员审核':'';}</span>

                                </div>
                                <div class="col-xs-12 col-sm-2">
                                    {if $row['tmp_'.$vo["item_id"].'_status']== STATUS_REJECT/}<h4 class="text-danger">驳回原因：{$row['tmp_'.$vo.item_id.'_reject_desc']}</h4>
                                    {/if}
                                </div>
                            </div>

                            <!-- <div class="col-xs-12 col-sm-3">
                                <input id="c-tmp_investment_total" class="form-control" step="0.0001" name="row[tmp_investment_total]" type="number" value="" placeholder="请填写要修改后的内容">
                            </div>
                            <div class="col-xs-12 col-sm-3">
                                <textarea id="c-tmp_investment_total_submit_desc" class="form-control " rows="2" name="row[tmp_investment_total_submit_desc]" cols="50"  placeholder="请填写修改原因"></textarea>
                            </div>
                            <div class="col-xs-12 col-sm-1">
                                <button type="submit" class="btn btn-success btn-embossed disabled">{:__('提交')}</button>
                            </div> -->

                        </div>

                    {/volist}
                    <!-- <hr> -->
                    <div class="form-group " >
                        <!-- <div class="row">
                            <label class="control-label col-xs-12 col-sm-2" >社会化招商</label>
                            <div class="col-xs-12 col-sm-4">
                                <input class="form-control"  type="text" value="{:$row['project_socialized']==1?'是':'否'}" readonly  >
                            </div>
                            <div class="col-xs-12 col-sm-4">
                                <select class="form-control {:$row['tmp_project_socialized_status']== STATUS_SUBMIT?'':'form_value'}" id="tmp_project_socialized"  name="row[tmp_project_socialized]" >
                                    <option value="">请选择</option>
                                    <option value="1" {:$row.tmp_project_socialized=="1"?"selected":""}>是</option>
                                    <option value="0" {:$row.tmp_project_socialized=="0"?"selected":""}>否</option>
                                </select>
                            </div>
                            <div class="col-xs-12 col-sm-2">
                            </div>
                        </div> -->
                       <!--  <div class="row">
                            <label class="control-label col-xs-12 col-sm-2" ></label>
                            <div class="col-xs-12 col-sm-4">
                                 <textarea id="tmp_project_socialized_submit_desc" class="form-control " rows="2" name="row[tmp_project_socialized_submit_desc]" data-required={:$row['tmp_project_socialized']== STATUS_CREATE?0:1 } rows="2" cols="50"  placeholder="请填写修改原因">{$row.tmp_project_socialized_submit_desc}</textarea>
                            </div>
                            <div class="col-xs-12 col-sm-4" style="padding-top: 10px;">
                                <button type="button"  class="btn btn-info field_detail" data-item_id="project_socialized">{:__('修改记录')}</button>
                                {neq name='isSuperAdmin' value='1'}
                                    <button type="button"  class="btn btn-warning single_draft {:$row['tmp_project_socialized_status']== STATUS_SUBMIT?'disabled':' ';}" data-item_id="project_socialize">{:__('暂存')}</button>
                                {/neq}

                                <button type="button"  class="btn  single_submit btn-success {:$row['tmp_project_socialized_status']== STATUS_SUBMIT?'disabled':' ';}" data-item_id="project_socialize">{:$row["tmp_project_socialized_status"]== STATUS_SUBMIT?'已提交':'提交';}</button>
                            </div>
                            <div class="col-xs-12 col-sm-2">
                            </div>
                        </div> -->

                    </div>
                    <div class="form-group " >
                        <label class="control-label col-xs-12 col-sm-2 ">

                        </label>
                        {if $row.reject_memo}
                        <label class="control-label col-xs-12 col-sm-6 " style="color: blue;text-align: left;">
                          驳回备注：{$row.reject_memo}
                        </label>
                        {/if}

                    </div>
                     {if $site.edit_switch}
                    <div class="form-group " >
                         <label class="control-label col-xs-12 col-sm-6" style="color: red;">请核对以上项目信息是否需要修改，若无需修改，请点击“无修改提交”按钮</label>

                    </div>
                    <div class="form-group layer-footer">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="reset" class="btn btn-default">{:__('Reset')}</button>
                            <button type="button" class="btn btn-info all_modidy_detail">{:__('修改记录')}</button>
                            <button type="button" class="btn btn-success all_submit">{:__('提交所有')}</button>
                            <button type="button" class="btn btn-warning no_modify" style="margin-left: 20px;">{:__('无修改提交')}</button>
                        </div>
                    </div>
                    {/if}
                    </form>

                </div>
            <!--     <div class="tab-pane fade " id="two">
                    <form id="plan_form" class="form-horizontal" role="plan-form" data-toggle="validator" method="POST" action="project_plan/add/ids/{$row.id}">
                        <div class="form-group">
                            <div class="row">
                                <label class="control-label col-xs-12 col-sm-1">{:__('日期')}:</label>
                                <div class="col-xs-12 col-sm-2">
                                    <input class="form-control datetimepicker"  type="text" id="plan_time" name="row[plan_time]" data-date-format="YYYY-MM-DD" data-use-current="true" value="" data-rule="required" >
                                    <span class="msg-box n-bottom" for="plan_time"></span>
                                 </div>
                                <label class="control-label col-xs-12 col-sm-1">{:__('内容')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input class="form-control"  type="text" id="plan_content" name="row[plan_content]"  value="" data-rule="required" >
                                    <span class="msg-box n-bottom" for="plan_content"></span>
                                </div>
                                <div class="col-xs-12 col-sm-2 text-right">
                                    <button type="submit" class="btn btn-success btn-form-add">{:__('OK')}</button>
                                </div>
                            </div>
                        </div>
                    </form>

                    <div class="panel panel-default panel-intro">
                        {:build_heading()}
                        <div class="panel-body">
                            <div id="myTabContent" class="tab-content">

                                <div class="widget-body no-padding">
                                    <div id="toolbar1" class="toolbar">
                                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> </a>
                                    </div>
                                    <table id="table1" class="table table-striped table-bordered table-hover table-nowrap"  data-operate-del="{:$auth->check('project_plan/del')}" width="100%">
                                    </table>
                                </div>

                            </div>
                        </div>
                    </div>
                </div> -->
                <!-- <div class="tab-pane fade " id="three">
                    <form id="capital_form" class="form-horizontal" role="capital-form" data-toggle="validator" method="POST" action="project_capital/add/ids/{$row.id}">
                        <div class="form-group">
                            <div class="row">
                                <label class="control-label col-xs-12 col-sm-1">{:__('到位日期')}:</label>
                                <div class="col-xs-12 col-sm-2">
                                    <input class="form-control datetimepicker"  type="text" id="gained_time" name="row[gained_time]" data-date-format="YYYY-MM-DD" data-use-current="true" value="" data-rule="required" >
                                    <span class="msg-box n-bottom" for="gained_time"></span>
                                 </div>
                                <label class="control-label col-xs-12 col-sm-1">{:__('内资资金')}:</label>
                                <div class="col-xs-12 col-sm-2">
                                    <input class="form-control capital"  type="text" id="domestic_capital" name="row[domestic_capital]"  value="0" data-rule="required(from, .capital); row[domestic_capital],money" data-msg-required="请至少填写一种资金" data-rule-money="[/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/, '请填写有效的金额']" >
                                    <span class="msg-box n-bottom" for="domestic_capital"></span>
                                </div>
                                <label class="control-label col-xs-12 col-sm-1">{:__('外资资金')}:</label>
                                <div class="col-xs-12 col-sm-2">
                                    <input class="form-control capital"  type="text" id="foreign_capital" name="row[foreign_capital]"  value="0"
                                    data-rule="required(from, .capital); row[foreign_capital],money" data-rule-money="[/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/, '请填写有效的金额']" >
                                    <span class="msg-box n-bottom" for="foreign_capital"></span>
                                </div>
                                <div class="col-xs-12 col-sm-2">
                                    <button type="submit" class="btn btn-success btn-form-add">{:__('OK')}</button>
                                </div>
                            </div>
                        </div>
                    </form>

                    <div class="panel panel-default panel-intro">
                        {:build_heading()}
                        <div class="panel-body">
                            <div id="myTabContent" class="tab-content">
                                <div class="widget-body no-padding">
                                    <div id="toolbar2" class="toolbar">
                                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> </a>
                                    </div>
                                    <table id="table2" class="table table-striped table-bordered table-hover table-nowrap"  data-operate-del="{:$auth->check('project_plan/del')}" width="100%">
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div> -->
                <!-- <div class="tab-pane fade" id="four">
                    <form id="formalities_form" class="form-horizontal" role="formalities-form" data-toggle="validator" method="POST" action="project_formalities/add/ids/{$row.id}">
                        <div class="form-group">
                            <div class="row">
                                <label class="control-label col-xs-12 col-sm-1">{:__('手续名称')}:</label>
                                <div class="col-xs-12 col-sm-5">
                                    <input class="form-control"  type="text" id="formalities_name" name="row[formalities_name]"  value="" data-rule="required" >
                                    <span class="msg-box n-bottom" for="formalities_name"></span>
                                </div>

                                <label class="control-label col-xs-12 col-sm-1">{:__('办理日期')}:</label>
                                <div class="col-xs-12 col-sm-2">
                                    <input class="form-control datetimepicker"  type="text" id="handel_time" name="row[handel_time]" data-date-format="YYYY-MM-DD" data-use-current="true" value="" data-rule="required" >
                                    <span class="msg-box n-bottom" for="handel_time"></span>
                                 </div>

                                <div class="col-xs-12 col-sm-2">
                                    <button type="submit" class="btn btn-success btn-form-add">{:__('OK')}</button>
                                </div>
                            </div>
                        </div>
                    </form>

                    <div class="panel panel-default panel-intro">
                        {:build_heading()}
                        <div class="panel-body">
                            <div id="myTabContent" class="tab-content">
                                <div class="widget-body no-padding">
                                    <div id="toolbar3" class="toolbar">
                                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> </a>
                                    </div>
                                    <table id="table3" class="table table-striped table-bordered table-hover table-nowrap"  data-operate-del="{:$auth->check('project_capital/del')}" width="100%">
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div> -->
            </div>
        </div>
    </div>
<script type="text/javascript">
    function clearNoNum(obj){
        obj.value = obj.value.replace(/[^\d.]/g,"");//清除"数字"和"."以外的字符
        obj.value = obj.value.replace(/^\./g,"");//验证第一个字符是数字而不是字符
        obj.value = obj.value.replace(/\.{2,}/g,".");//只保留第一个.清除多余的
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');//只能输入两个小数
    }
</script>